#ifndef ALPBITMAP_H
#define ALPBITMAP_H

#include "bitmap.h"

typedef struct _CAlphaBitmap
{
	pCBitmap	bitmap;
	pCBitmap	alpchannel;
} CAlphaBitmap;

// PUBLIC Common interfaces
//
PLIBEXP pCAlphaBitmap	newCAlphaBitmap(char * BitmapName, char* AlphaChannel, uint32 Group);
PLIBEXP void			deleteCAlphaBitmap(pCAlphaBitmap This);
PLIBEXP pCAlphaBitmap	newCAlphaBitmapBlank(int32 width, int32 height);

#define			CAlphaBitmap(This)			((This) ? (This)->bitmap : 0)
#define			CAlphaAlphaBitmap(This)		((This) ? (This)->alpchannel : 0)
#define 		CAlphaBitmapWidth(This)		((This) ? (This)->bitmap->cSize.x : 0)
#define 		CAlphaBitmapHeight(This)	((This) ? (This)->bitmap->cSize.y : 0)
#define			CAlphaBitmapLock(pCAlphaBitmap)
#define			CAlphaBitmapUnlock(pCAlphaBitmap)

#if 0
PLIBEXP void	CAlphaBitmapBitmapBlt(pCAlphaBitmap This, int32 dx, int32 dy,
					pCAlphaBitmap Src);
PLIBEXP void	CAlphaBitmapTransparentBitmapBlt(pCAlphaBitmap This, int32 dx, int32 dy,
					pCAlphaBitmap Src);
PLIBEXP void	CAlphaBitmapBitmapBltSection(pCAlphaBitmap This, int32 dx, int32 dy,
					int32 sx, int32 sy, int32 sw, int32 sh, pCAlphaBitmap Src);
PLIBEXP void	CAlphaBitmapTransparentBitmapBltSection(pCAlphaBitmap, int32 dx, int32 dy,
					int32 sx, int32 sy, int32 sw, int32 sh, pCAlphaBitmap Src);
#endif

PLIBEXP	COLORSIZE	FindAlphaPaletteCombination(COLORSIZE SrcIndex, COLORSIZE DstIndex, uint8 Alpha, bool8 forceFullColors);

// PUBLIC Platform interface
//
PLIBEXP void	CAlphaBitmapDestruct(pCAlphaBitmap This);

typedef struct _CAlphaCache
{
	uint8 dummy;
} CAlphaCache;

typedef struct _CAlphaCache*	pCAlphaCache;

static pCAlphaCache g_alphaCache;

#endif
